package com.usian.ai.controller;

import com.usian.ai.common.Result;
import com.usian.ai.pojo.vo.QuestionLibReqVo;
import com.usian.ai.pojo.vo.QuestionLibSaveReqVo;
import com.usian.ai.service.QuestionLibService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @TODO:
 * @Author:baimu
 * @Date:2024 12 10 11 16
 **/

@RestController
@RequestMapping("/questionLib")
@CrossOrigin
public class QuestionLibController {

    @Autowired
    QuestionLibService questionLibService;


    @PostMapping("/listInterviewer")
    public Result listInterviewer(@RequestBody QuestionLibReqVo questionLibReqVo)
    {
        return questionLibService.listInterviewer(questionLibReqVo);
    }


    @PostMapping("/addQuestionLib")
    public Result addQuestionLib(@RequestBody @Validated  QuestionLibSaveReqVo questionLibSaveReqVo){
        return questionLibService.addQuestionLib(questionLibSaveReqVo);
    }
}
